//
// Created by gogoqiu on 2021/12/13.
//

#include "MainFrame.h"
#include "ChatWnd.h"

enum {
    ID_Hello,
    ID_TB,
    ID_CONNECT
};

MainFrame::MainFrame(wxWindow *parent) :wxFrame( parent, wxID_ANY, "配置", wxDefaultPosition, wxDefaultSize,
wxDEFAULT_FRAME_STYLE ^ wxMAXIMIZE_BOX ^ wxRESIZE_BORDER ){
    auto *menuFile = new wxMenu;
    //
    menuFile->Append(ID_Hello, "&Hello...\tCtrl-H",
                     "Help string shown in status bar for this menu item");
    menuFile->AppendSeparator();
    menuFile->Append(wxID_EXIT);
    auto *menuHelp = new wxMenu;
    menuHelp->Append(wxID_ABOUT);
    auto *menuBar = new wxMenuBar;
    menuBar->Append(menuFile, "&File");
    menuBar->Append(menuHelp, "&Help");
    SetMenuBar( menuBar );
    CreateStatusBar();
    SetStatusText("Welcome to wxWidgets!");
    SetClientSize(wxSize(350,500));
    m_wndToolbar= new wxToolBar( this, ID_TB, wxDefaultPosition,wxDefaultSize,
                                 wxTB_FLAT|wxTB_HORIZONTAL|wxTB_TEXT|wxTB_NODIVIDER );//显示文字，不显示上面的分割线
    wxBitmap itemBitmap1( 20, 20 );
    //wxIcon *icons = wxIcon( _T( "D：//check.ico"),wxBITMAP_TYPE_ICO,16,16 );
    //m_wndToolbar->AddTool( ID_CONNECT, _T("连接"), itemBitmap1, _T("连接服务器"), wxITEM_NORMAL);
    //m_wndToolbar->SetToolBitmapSize(wxSize(16, 16));
}

//sub panel
MainFrame::~MainFrame() {

}
